package com.woniu.user.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户优惠券对象 tb_customer_coupon
 *
 * @author yy
 * @date 2023-04-03
 */
@ApiModel(value = "CustomerCoupon", description = "用户优惠券")
public class CustomerCoupon implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @ApiModelProperty("主键")
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    @ApiModelProperty("用户id")
    private Long customerId;

    /** 优惠券id */
    @Excel(name = "优惠券id")
    @ApiModelProperty("优惠券id")
    private Long couponId;

    /** 优惠券有效期开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "优惠券有效期开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("优惠券有效期开始时间")
    private Date validStartDate;

    /** 优惠券有效期结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "优惠券有效期结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("优惠券有效期结束时间")
    private Date validEndDate;

    /** 是否过期 0-否 1-是 */
    @Excel(name = "是否过期 0-否 1-是")
    @ApiModelProperty("是否过期 0-否 1-是")
    private Long couponStatus;

    /** 是否被使用 0-否 1-是 */
    @Excel(name = "是否被使用 0-否 1-是")
    @ApiModelProperty("是否被使用 0-否 1-是")
    private Long used;

    /** 被使用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "被使用时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("被使用时间")
    private Date usedTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setCustomerId(Long customerId)
    {
        this.customerId = customerId;
    }

    public Long getCustomerId()
    {
        return customerId;
    }
    public void setCouponId(Long couponId)
    {
        this.couponId = couponId;
    }

    public Long getCouponId()
    {
        return couponId;
    }
    public void setValidStartDate(Date validStartDate)
    {
        this.validStartDate = validStartDate;
    }

    public Date getValidStartDate()
    {
        return validStartDate;
    }
    public void setValidEndDate(Date validEndDate)
    {
        this.validEndDate = validEndDate;
    }

    public Date getValidEndDate()
    {
        return validEndDate;
    }
    public void setCouponStatus(Long couponStatus)
    {
        this.couponStatus = couponStatus;
    }

    public Long getCouponStatus()
    {
        return couponStatus;
    }
    public void setUsed(Long used)
    {
        this.used = used;
    }

    public Long getUsed()
    {
        return used;
    }
    public void setUsedTime(Date usedTime)
    {
        this.usedTime = usedTime;
    }

    public Date getUsedTime()
    {
        return usedTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("customerId", getCustomerId())
            .append("couponId", getCouponId())
            .append("validStartDate", getValidStartDate())
            .append("validEndDate", getValidEndDate())
            .append("couponStatus", getCouponStatus())
            .append("used", getUsed())
            .append("usedTime", getUsedTime())
            .toString();
    }
}
